package homework;

public class Student {
    private String name;
    private int sid;
    private int grade;
    private String gender;
    private int age;
    private String personality;
    public String getName() {
        return name;
    }
    public void setName(String name){
        this.name=name;
    }

    public int getSid() {
        return sid;
    }
    public void setSid(int sid){
        this.sid=sid;
    }

    public int getGrade() {
        return grade;
    }
    public void setGrade(int grade){
        this.grade=grade;
    }

    public String getGender() {
        return gender;
    }
    public void setGender(String gender){
        this.gender=gender;
    }

    public int getAge() {
        return age;
    }
    public void setAge(int age){
        this.age=age;
    }

    public String getPersonality() {
        return personality;
    }
    public void setPersonality(String personality){
        this.personality=personality;
    }
    public void say(){
        System.out.println("我是个学生！我的姓名是"+name+",我的学号是"+sid+"," +
                "我的班级是"+grade+"班,我的性别是"+gender+",我的年龄是"+age+",我的性格比较"+personality);
    }
}
class StudentFunction{
    public static void main(String[] args){
        Student stu1=new Student();
        stu1.setName("张三");
        stu1.setSid(202301);
        stu1.setGrade(5);
        stu1.setGender("男");
        stu1.setAge(15);
        stu1.setPersonality("外向");
        stu1.say();

        Student stu2=new Student();
        stu2.setName("李四");
        stu2.setSid(202306);
        stu2.setGrade(2);
        stu2.setGender("男");
        stu2.setAge(16);
        stu2.setPersonality("开朗");
        stu2.say();

        Student stu3=new Student();
        stu3.setName("小王");
        stu3.setSid(202305);
        stu3.setGrade(8);
        stu3.setGender("女");
        stu3.setAge(15);
        stu3.setPersonality("活泼");
        stu3.say();
    }
}
